Filter hook '{$adjacent}_post_link'
in WP Core File wp-includes/link-template.php at line 2372
Description
Filters the adjacent post link. The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include: - `next_post_link` - `previous_post_link`
Occurrences
Filename |
Line Number |
wp-includes/link-template.php |
2372 |
Parameters
Type |
Name |
Description |
string |
$output |
The adjacent post link. |
string |
$format |
Link anchor format. |
string |
$link |
Link permalink format. |
WP_Post|string |
$post |
The adjacent post. Empty string if no corresponding post exists. |
string |
$adjacent |
Whether the post is previous or next. |
PHP Doc
/**
* Filters the adjacent post link.
*
* The dynamic portion of the hook name, `$adjacent`, refers to the type
* of adjacency, 'next' or 'previous'.
*
* Possible hook names include:
*
* - `next_post_link`
* - `previous_post_link`
*
* @since 2.6.0
* @since 4.2.0 Added the `$adjacent` parameter.
*
* @param string $output The adjacent post link.
* @param string $format Link anchor format.
* @param string $link Link permalink format.
* @param WP_Post|string $post The adjacent post. Empty string if no corresponding post exists.
* @param string $adjacent Whether the post is previous or next.
*/